﻿using GDPView.Services;
using Microsoft.AspNetCore.Mvc;

namespace GDPView.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class GDPGrowthRateDataController : ControllerBase
    {
        private readonly IGDPGrowthRateDataRepository _gDPGrowthRateData;
        public GDPGrowthRateDataController(IGDPGrowthRateDataRepository gDPGrowthRateData)
        {
            _gDPGrowthRateData = gDPGrowthRateData;
        }
        [HttpGet]
        public async Task<IActionResult> GetGDPGrowthRateDatas()
        {
            var gDPGrowthRateDatasFromRepository = await _gDPGrowthRateData.GetGDPGrowthRateDatasAsync();
            return Ok(gDPGrowthRateDatasFromRepository);
        }
    }
}
